package com.tnovoselec.android.favorites.entity;

import com.j256.ormlite.field.DataType;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * Title: Android Framework - Favorites <br /><br />
 * Copyright: Copyright (c) 2011 <br /><br />
 * NTH Company: NTH d.o.o. <br /><br />
 * 
 * Forecast object represents meteo data for given day. It usually associated with @MeteoFavoritesDto.
 * 
 * @author Tomislav Novoselec
 * @version 1.0.0
 * @since 1.0.0
 * 
 * 
 */

@DatabaseTable(tableName = "forecast")
public class ForecastFavoritesDto extends ValidEntity{

    @DatabaseField(id = true, canBeNull = false, dataType = DataType.INTEGER)
    private Integer id;

    @DatabaseField(canBeNull = false, dataType = DataType.STRING)
    private String cityId;

    @DatabaseField(canBeNull = false, dataType = DataType.STRING)
    private String dayOfWeekString;

    @DatabaseField(canBeNull = false, dataType = DataType.INTEGER)
    private Integer temperatureLow;

    @DatabaseField(canBeNull = false, dataType = DataType.INTEGER)
    private Integer temperatureHigh;

    @DatabaseField(canBeNull = true, dataType = DataType.STRING)
    private String iconUrl;

    @DatabaseField(canBeNull = true, dataType = DataType.STRING)
    private String conditionString;

    @DatabaseField(canBeNull = true, dataType = DataType.STRING)
    private String dayOfWeekIndex;

    @DatabaseField(canBeNull = true, dataType = DataType.STRING)
    private String conditionIndex;

    public ForecastFavoritesDto() {
	super();
    }

    public int getId() {
	return id;
    }

    public void setId(int id) {
	this.id = id;
    }

    public String getCityId() {
	return cityId;
    }

    public void setCityId(String cityId) {
	this.cityId = cityId;
    }

    public String getDayOfWeekString() {
	return dayOfWeekString;
    }

    public void setDayOfWeekString(String dayOfWeekString) {
	this.dayOfWeekString = dayOfWeekString;
    }

    public int getTemperatureLow() {
	return temperatureLow;
    }

    public void setTemperatureLow(int temperatureLow) {
	this.temperatureLow = temperatureLow;
    }

    public int getTemperatureHigh() {
	return temperatureHigh;
    }

    public void setTemperatureHigh(int temperatureHigh) {
	this.temperatureHigh = temperatureHigh;
    }

    public String getIconUrl() {
	return iconUrl;
    }

    public void setIconUrl(String iconUrl) {
	this.iconUrl = iconUrl;
    }

    public String getConditionString() {
	return conditionString;
    }

    public void setConditionString(String conditionString) {
	this.conditionString = conditionString;
    }

    public String getDayOfWeekIndex() {
	return dayOfWeekIndex;
    }

    public void setDayOfWeekIndex(String dayOfWeekIndex) {
	this.dayOfWeekIndex = dayOfWeekIndex;
    }

    public String getConditionIndex() {
	return conditionIndex;
    }

    public void setConditionIndex(String conditionIndex) {
	this.conditionIndex = conditionIndex;
    }

    public static String getCreateQuery() {
	return "CREATE TABLE forecast (" + 
	"id INTEGER PRIMARY KEY AUTOINCREMENT, " + 
	"dayOfWeekString TEXT, " + 
	"iconUrl TEXT, " + 
	"conditionString TEXT, " + 
	"dayOfWeekIndex TEXT, " + 
	"conditionIndex TEXT, " + 
	"cityId INTEGER, " + 
	"temperatureLow INTEGER, " + 
	"temperatureHigh INTEGER);";
    }

    @Override
    public boolean isValid() {
	// TODO Auto-generated method stub
	return false;
    }

}
